From 5585ce9e9132e231f907bbf7693e737fa4b1bc19 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 12 Apr 2006 04:13:06 +0000 Subject: [PATCH] Silently do nothing if the widget is not a child. (Coverity) 2006-04-12 Matthias Clasen * gtk/gtknotebook.c (gtk_notebook_remove): Silently do nothing if the widget is not a child. (Coverity) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ gtk/gtknotebook.c | 5 ++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5046174ad0..0cae1cc34c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-04-12 Matthias Clasen + + * gtk/gtknotebook.c (gtk_notebook_remove): Silently do nothing + if the widget is not a child. (Coverity) + 2006-04-11 Matthias Clasen * gdk/x11/gdkkeys-x11.c (get_xkb): Return early in error diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 5046174ad0..0cae1cc34c 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2006-04-12 Matthias Clasen + + * gtk/gtknotebook.c (gtk_notebook_remove): Silently do nothing + if the widget is not a child. (Coverity) + 2006-04-11 Matthias Clasen * gdk/x11/gdkkeys-x11.c (get_xkb): Return early in error diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 27fef2a95c..c08db07bca 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -3299,7 +3299,10 @@ gtk_notebook_remove (GtkContainer *container, page_num++; children = children->next; } - + + if (children == NULL) + return; + g_object_ref (widget); gtk_notebook_real_remove (notebook, children); -- 2.30.2